<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>礼品添加</title>
</head>
<body>
<form class="layui-form" lay-filter="lipingguanliForm" id="add_lipingguanli_Form" action="" style="padding:15px 10px;">
    <input type="hidden" name="lp_Id">
    <div class="layui-form-item">
        <label class="layui-form-label">礼品名称</label>
        <div class="layui-input-block">
            <input type="text" name="lp_name" required  lay-verify="required" placeholder="请输入礼品名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">礼品分组</label>
        <div class="layui-input-block" >
            <select name="lp_fz" id="lpfz" xm-select="lp_fz" xm-select-direction="down">
                <option value="-1">请选择</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">对公或零售</label>
        <div class="layui-input-block">
            <input type="text" name="lp_ls" required  lay-verify="required" placeholder="请输入对公或者零售" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">礼品描述</label>
        <div class="layui-input-block">
            <input type="text" name="lp_ms" required  lay-verify="required" placeholder="请输入礼品描述" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">礼品积分</label>
        <div class="layui-input-block">
            <input type="text" name="lp_jf" required  lay-verify="required" placeholder="请输入礼品积分" autocomplete="off" class="layui-input">
        </div>
    </div>
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label">是否锁定</label>-->
        <!--<div class="layui-input-block">-->
            <!--<input type="checkbox" name="locked" value="1" lay-skin="switch">-->
        <!--</div>-->
    <!--</div>-->

    <script>
        layui.form.render();
        $.get("http://localhost:8888/lipinlx/search",function(data){
            $.each(data,function(){
                var opt = $("<option></option>").appendTo("#lpfz");
                opt.text(this.lp_fz).val(this.lp_fz);
            });
            layui.formSelects.render()
        });

    </script>

</body>
</html>